import java.util.Scanner;

public class Text1 {
    public static void main(String[] args) {
        Scanner sca = new Scanner(System.in);
        int n = sca.nextInt();
        int num = fun(n);
        System.out.println(num);
    }
    public static int fun(int n){
        if(n==1){
            return 1;
        }
        return n*fun(n-1);
    }
}
